import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            redirect: "/showConsumptionRecord",
            // name: 'home',
            // component: HomeView
        },
        {
            path: "/upload",
            name: "upload",
            component: () => import("../components/UpLoad/UpLoad.vue"),
        },
        {
            path: "/showFileRecord",
            name: "showFileRecord",
            component: () => import("../components/FileRecord/FileRecord.vue"),
        },
        {
            path: "/showConsumptionRecord",
            name: "showConsumptionRecord",
            component: () => import("../components/ConsumptionRecord/ConsumptionRecord.vue"),
        },
        {
            path: "/dataAnalysis",
            name: "dataAnalysis",
            component: () => import("../components/DataAnalysis/DataAnalysis.vue"),
        },
        {
            path: "/assetsStatistics",
            name: "assetsStatistics",
            component: () => import("../components/Assets/AssetsStatistics.vue"),
        },
    ],
});

export default router;
